<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>改变背景颜色</title>
    <link rel="stylesheet" href="css/style.css">
</head>
<body>

<!--<div id="test">nihao</div>
<div class="test">.nihao</div>-->
<!--<a href="javascript:alert('hello');">test</a>

<input type="text"  value="test" onclick="alert('hello');">-->
<!--<input type="button" value="红色" onclick="color()">
<input type="button" value="绿色" onclick="color1()">
<input type="button" value="紫色" onclick="color2()">
<input type="button" value="粉色" onclick="color3()">-->



<button onclick="color('red')">红色</button>
<button onclick="color('yellow')">黄色</button>
<button onclick="color('blue')">蓝色</button>


<input type="color" onclick="color_diy(this)">



<script src="js/script.js"></script>
</body>
</html>